package com.yuwei.live.adapter

import com.chad.library.adapter.base.BaseQuickAdapter
import com.chad.library.adapter.base.viewholder.BaseViewHolder
import com.yuwei.live.R
import com.yuwei.live.entity.RankingEntityItem

class MoreLiveAdapter: BaseQuickAdapter<RankingEntityItem, BaseViewHolder>(
    R.layout.item_more_live
) {
    override fun convert(holder: BaseViewHolder, item: RankingEntityItem) {
        if( item.room_name.length > 5){
            holder.setText(R.id.more_live_title,"${item.room_name.substring(0,3)}的直播间")
            holder.setText(R.id.more_live_name,item.room_name.substring(0,3))
        }

        holder.setText(R.id.more_live_hot,item.hot.toString())
    }
}